/**
 * 以下为框架基础模块勿更改！！！
 */
import {NgModule, ErrorHandler} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {IonicApp, IonicModule, IonicErrorHandler, ViewController} from 'ionic-angular';
import {MyApp} from './app.component';
import {ComponentsModule} from "../components/components.module";
import {File} from "@ionic-native/file";
import {Media} from "@ionic-native/media";
import {HTTP} from '@ionic-native/http';
import {FileTransfer} from "@ionic-native/file-transfer";
import {StatusBar} from '@ionic-native/status-bar';
import {SplashScreen} from '@ionic-native/splash-screen';
import {Device} from "@ionic-native/device";
import {Network} from "@ionic-native/network";
import {JPush} from '@jiguang-ionic/jpush';
import {Keyboard} from "@ionic-native/keyboard";
import {RecorderService} from '../services/recorder.service'
import {ScreenOrientation} from "@ionic-native/screen-orientation";
import {IonicStorageModule} from "@ionic/storage";
import {AndroidPermissions} from "@ionic-native/android-permissions";
import {ThemeableBrowser} from "@ionic-native/themeable-browser";
import {FingerprintAIO} from '@ionic-native/fingerprint-aio';
import {Diagnostic} from '@ionic-native/diagnostic';
import { InAppBrowser } from '@ionic-native/in-app-browser';
import { MultiPickerModule } from 'ion-multi-picker';

// Import HttpClientModule from @angular/common/http
import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule} from '@angular/common/http'
/**
 * 以下为项目基础模块，谨慎修改！
 */

import {AuthService} from "../services/common/auth.service";
import {BackButtonService} from "../services/common/back-button.service";
import {HttpInterceptorService} from "../services/common/http-interceptor.service";
import {LoadingService} from "../services/common/loading.service";
import {CryptoService} from '../services/common/crypto.service';
import {ConfigurationStoreService} from '../services/common/configuration-store.service';
import {ConfigurationService} from '../services/common/configuration.service';
import {DeviceService} from '../services/native/device/device.service';
import {UnlockService} from '../services/native/authentication/authentication.service';
/*import {CaptchaService} from '../services/common/captcha.service';*/
import {HttpErrorHandlerService} from '../services/common/http-error-handler.service';
import {CovertTimeService} from "../services/utils/covert-time.service";
import {JPushService} from "../services/native/push/j-push.service";
import {PushService} from '../services/native/push/push.service';
import {JPushControlerService} from "../services/native/push/jpush-controler.service";
import {FileService} from "../services/native/file/file.service";
import {LocalStorageService} from "../services/native/local-storage/local-storage.service";

/**
 * 以下为provider
 */
import {LoginProvider} from '../providers/login/login';
import {WebcastFavoriteListProvider} from '../providers/webcast/webcast-favorite-list/webcast-favorite-list';
import {WebcastDetailProvider} from "../providers/webcast/webcast-detail/webcast-detail";
import {FollowstateProvider} from '../providers/activity/followstate/followstate';
import {ToastService} from "../services/common/toast.service";
import {ExtraBenefitProvider} from '../providers/policy/extra-benefit/extra-benefit';
import {TalentPoolProvider} from '../providers/add-staff/talent-pool/talent-pool';
import {AddStaffProgressListProvider} from '../providers/add-staff/add-staff-progress-list/add-staff-progress-list';
import {AddStaffProgressEditProvider} from '../providers/add-staff/add-staff-progress-edit/add-staff-progress-edit';
import {CommissionProvider} from '../providers/me/commission/commission';
import {AdpActionSheetController} from "../components/common/adp-action-sheet/adp-action-sheet-controller";
import {AdpActionSheetComponent} from "../components/common/adp-action-sheet/adp-action-sheet.component";
import {MobileAccessibility} from "@ionic-native/mobile-accessibility";
import {CacheImgService} from "../services/native/cache-img/cache-img.service";
import {AdpMenuController} from "../components/common/adp-menu/adp-menu.controller";

@NgModule({
    declarations: [
        MyApp,
    ],
    imports: [
        BrowserModule,
        // Include it under 'imports' in your application module
        // after BrowserModule.
        HttpClientModule,
        IonicModule.forRoot(MyApp, {
            tabsHideOnSubPages: 'true',
            iconMode: 'ios',
            mode: 'ios',
        }),
        IonicStorageModule.forRoot({
            name: 'adpdb',
            driverOrder: ['indexeddb', 'websql', 'sqlite']
        }),
        ComponentsModule,
        MultiPickerModule
    ],
    bootstrap: [IonicApp],
    entryComponents: [
        MyApp,
        AdpActionSheetComponent
    ],
    providers: [
        {
            provide: HTTP_INTERCEPTORS,
            useClass: HttpInterceptorService,
            multi: true,
        },
        HttpErrorHandlerService,
        AuthService,
        CryptoService,
        ConfigurationStoreService,
        ConfigurationService,
        DeviceService,
        UnlockService,
       /* CaptchaService,*/
        BackButtonService,
        LoadingService,
        ToastService,
        File,
        Media,
        Device,
        Network,
        JPush,
        JPushControlerService,
        {
            provide: PushService,
            useClass: JPushService
        },
        Keyboard,
        HTTP,
        FingerprintAIO,
        Diagnostic,
        RecorderService,
        StatusBar,
        SplashScreen,
        {provide: ErrorHandler, useClass: IonicErrorHandler},
        LoginProvider,
        ScreenOrientation,
        AndroidPermissions,
        ThemeableBrowser,
        InAppBrowser,
        WebcastFavoriteListProvider,
        WebcastDetailProvider,
        WebcastDetailProvider,
        FollowstateProvider,
        ExtraBenefitProvider,
        TalentPoolProvider,
        AddStaffProgressListProvider,
        AddStaffProgressEditProvider,
        CommissionProvider,
        FileService,
        FileTransfer,
        LocalStorageService,
        CovertTimeService,
        AdpActionSheetController,
        MobileAccessibility,
        CacheImgService,
        AdpMenuController
        // ViewController
    ]
})
export class AppModule {
}
